Repository navigation
feat(deploy): pass the restricted Pod Security Standard - #140
Merged
Merged
Conversation
Each shipped container (backend, frontend, bundled Valkey) now sets allowPrivilegeEscalation: false, drops all capabilities, sets runAsNonRoot: true, and uses the RuntimeDefault seccomp profile. - Backend: read-only root filesystem with an emptyDir at /tmp. Vert.x creates its file cache there at start, and the backend does not start without it. - Frontend: the image moves to nginxinc/nginx-unprivileged (UID 101, port 8080). The served env-config.js is a link to /tmp/env-config.js, so the root filesystem is read-only with an emptyDir at /tmp. The Service keeps port 80. - Valkey: the upstream image starts as root, so the manifest sets runAsUser 999 and runAsGroup 1000. - compose: map the frontend port 8080, and start nginx through the image entrypoint so that env-config.js is written. - CI: the manifests job applies the quickstart overlay to a kind cluster as a server-side dry run and fails on a Pod Security warning. The frontend image check starts the image with the limits of the Deployment. The frontend image now listens on port 8080, not port 80. The manifests do not start a frontend image from before this change, so the image pins must move to an image with this change before the manifests are released. See docs/adr/0044. Closes #134
Jumziey
force-pushed
the
feat/restricted-pod-security
branch
from
November 21, 2026 11:11
bf78bfe to
f4c77f5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #134
Summary
Each shipped container now passes the
restrictedPod Security Standard.The new PR check, in the
manifestsjob:enforcerejects only Pods, not a Deployment with a bad pod template. Thus, the check useswarnand makes each warning an error.Other changes:
compose.ymlandcompose.quickstart.ymlmap the frontend port 8080.compose.ymlstarts nginx through the image entrypoint. The old command bypassed the entrypoint, soenv-config.jswas not generated.docs/deployment.mdhas a "Pod security" section. ADR 0044 records the trade-offs.Evidence
Before:
bash ci/check-restricted-pod-security.shon the old manifests:After:
Before:
bash frontend/ci/bin/test-build-version-image.shwith the new checks on the old image: exit 56, no listener on port 8080.After: 14 checks pass. The new one:
Before: backend with
readOnlyRootFilesystem: trueand no writable/tmp, on a kind cluster that enforcesrestricted:After: with the
emptyDirat/tmp, all five pods run. The backend is ready and scrapes, the frontend serves/and/env-config.js, and Valkey saves a snapshot. Each container hasCapEff: 0andNoNewPrivs: 1. This run was by hand, with the frontend image of this branch and the backendedgeimage.Frontend tests: 252 pass. kubeconform: all three compositions are valid.
The backend Gradle suite was not run locally. No backend code changed.
Merge Danger
Door: two-way
A revert restores the old manifests and the old image recipe. But each frontend image that is published from this change listens on port 8080 and stays published.
Blast Radius: deployers
deploy/k8s/base/kustomization.yamlpins the frontend to0.0.46, which runs as root on port 80. The new manifests do not start that image. After this merge, the quickstart overlay onmaingives a frontend pod that does not start. The release job bumps the pins onmainafter a stable tag, so the tree at the tag itself still has the old pins. Before the next tag, pin the two images to thesha-<short>tag of this merge commit.valkey/valkey:8-alpine. A different Valkey image can need different IDs./tmpfails only in a cluster.